<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" 
	xmlns="http://java.sun.com/xml/ns/javaee" 
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
	http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
	<!-- 指定flv流媒体文件的存放位置,即red5服务器上streams目录的位置 -->
	<context-param> 
		<param-name>streams</param-name> 
		<param-value>G:/Tomcat6.0/webapps/red5/streams</param-value> 
	</context-param>	
	
	<!-- 指定log4j.properties配置文件的位置 -->
	<context-param> 
		<param-name>log4jConfigLocation</param-name> 
		<param-value>/WEB-INF/classes/log4j.properties</param-value> 
	</context-param>
		
	<!-- 指定Spring的配置文件 -->
	<context-param>
		<param-name>contextConfigLocation</param-name>
		<param-value>/WEB-INF/applicationContext.xml</param-value>
	</context-param>
	
	<!-- 指定以Listener方式启动Spring容器 -->
    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>	

	<!-- 指定以Listener方式启动Log4j -->
	<listener> 
		<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class> 
	</listener> 
	
	<!-- 定义Struts2的核心控制器FilterDispathcer -->
    <filter>
        <filter-name>struts2</filter-name>
        <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
    </filter>
        
	<!-- 定义编码过滤器 -->
	<filter> 
		<filter-name>encodingFilter</filter-name> 
		<filter-class> 
			org.springframework.web.filter.CharacterEncodingFilter 
		</filter-class> 
		<init-param> 
			<param-name>encoding</param-name> 
			<param-value>gbk</param-value> 
		</init-param> 
	</filter>	
	    
    <filter-mapping>
        <filter-name>struts2</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
	<filter-mapping> 
		<filter-name>encodingFilter</filter-name> 
		<url-pattern>*.action</url-pattern> 
	</filter-mapping> 
	<filter-mapping> 
		<filter-name>encodingFilter</filter-name> 
		<url-pattern>*.jsp</url-pattern> 
	</filter-mapping>

	<!-- 配置在线编辑器组件FCKeditor -->	
	<servlet>
		<servlet-name>Connector</servlet-name>
		<servlet-class>com.fredck.FCKeditor.connector.ConnectorServlet</servlet-class>
		<init-param>
			<param-name>baseDir</param-name>
			<param-value>/UserFiles/</param-value>
		</init-param>
		<init-param>
			<param-name>debug</param-name>
			<param-value>true</param-value>
		</init-param>
		<load-on-startup>1</load-on-startup>
	</servlet>

	<servlet>
		<servlet-name>SimpleUploader</servlet-name>
		<servlet-class>com.fredck.FCKeditor.uploader.SimpleUploaderServlet</servlet-class>
		<init-param>
			<param-name>baseDir</param-name>
			<param-value>/UserFiles/</param-value>
		</init-param>
		<init-param>
			<param-name>debug</param-name>
			<param-value>true</param-value>
		</init-param>
		<init-param>
			<param-name>enabled</param-name>
			<param-value>false</param-value>
		</init-param>
		<init-param>
			<param-name>AllowedExtensionsFile</param-name>
			<param-value></param-value>
		</init-param>
		<init-param>
			<param-name>DeniedExtensionsFile</param-name>
			<param-value>php|php3|php5|phtml|asp|aspx|ascx|jsp|cfm|cfc|pl|bat|exe|dll|reg|cgi</param-value>
		</init-param>
		<init-param>
			<param-name>AllowedExtensionsImage</param-name>
			<param-value>jpg|gif|jpeg|png|bmp</param-value>
		</init-param>
		<init-param>
			<param-name>DeniedExtensionsImage</param-name>
			<param-value></param-value>
		</init-param>
		<init-param>
			<param-name>AllowedExtensionsFlash</param-name>
			<param-value>swf|fla</param-value>
		</init-param>
		<init-param>
			<param-name>DeniedExtensionsFlash</param-name>
			<param-value></param-value>
		</init-param>
		<load-on-startup>1</load-on-startup>
	</servlet>

  <servlet-mapping>
    <servlet-name>Connector</servlet-name>
    <url-pattern>/editor/filemanager/browser/default/connectors/jsp/connector</url-pattern>
  </servlet-mapping>
  
  <servlet-mapping>
    <servlet-name>SimpleUploader</servlet-name>
    <url-pattern>/editor/filemanager/upload/simpleuploader</url-pattern>
  </servlet-mapping> 	    
      
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>
  
	<!-- 配置404与500错误处理 -->    
	 <error-page>
	 	<error-code>404</error-code>
	 	<location>/404.htm</location>
	 </error-page>
	 <error-page>
	 	<error-code>500</error-code>
	 	<location>/500.htm</location>
	 </error-page>  
</web-app>
